package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SpecificationCategoryManagementMapper;
import com.ruoyi.system.domain.SpecificationCategoryManagement;
import com.ruoyi.system.service.ISpecificationCategoryManagementService;

/**
 * 规格分类管理 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-29
 */
@Service
public class SpecificationCategoryManagementServiceImpl implements ISpecificationCategoryManagementService
{
    @Autowired
    private SpecificationCategoryManagementMapper specificationCategoryManagementMapper;

    /**
     * 通过id查询规格分类管理
     *
     * @param id 规格分类管理主键
     * @return 规格分类管理
     */
    @Override
    public SpecificationCategoryManagement selectSpecificationCategoryManagementById(Long id)
    {
        return specificationCategoryManagementMapper.selectSpecificationCategoryManagementById(id);
    }

    /**
     * 通过规格分类名称和状态查询规格分类管理列表
     *
     * @param specificationCategoryName,status 规格分类名称,状态
     * @return 规格分类管理
     */
    @Override
    public List<SpecificationCategoryManagement> selectSpecificationCategoryManagementListByName(String specificationCategoryName,String status)
    {
        return specificationCategoryManagementMapper.selectSpecificationCategoryManagementListByName(specificationCategoryName,status);
    }

    /**
     * 新增规格分类管理
     *
     * @param specificationCategoryManagement 规格分类管理
     * @return 结果
     */
    @Override
    public int insertSpecificationCategoryManagement(SpecificationCategoryManagement specificationCategoryManagement)
    {
        return specificationCategoryManagementMapper.insertSpecificationCategoryManagement(specificationCategoryManagement);
    }

    /**
     * 修改规格分类管理
     *
     * @param specificationCategoryManagement 规格分类管理
     * @return 结果
     */
    @Override
    public int updateSpecificationCategoryManagement(SpecificationCategoryManagement specificationCategoryManagement)
    {
        return specificationCategoryManagementMapper.updateSpecificationCategoryManagement(specificationCategoryManagement);
    }

    /**
     * 通过id批量删除规格分类管理信息
     *
     * @param ids 需要删除的规格分类管理主键
     * @return 结果
     */
    @Override
    public int deleteSpecificationCategoryManagementByIds(Long[] ids)
    {
        return specificationCategoryManagementMapper.deleteSpecificationCategoryManagementByIds(ids);
    }

    /**
     * 通过id删除规格分类管理信息
     *
     * @param id 规格分类管理主键
     * @return 结果
     */
    @Override
    public int deleteSpecificationCategoryManagementById(Long id)
    {
        return specificationCategoryManagementMapper.deleteSpecificationCategoryManagementById(id);
    }
}
